<!doctype html>
[#escape x as (x)!?html]
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <title>${guestbook.title} - ${site.title} - Powered by JPROCMS</title>
  <meta name="keywords" content="留言板">
  [#include '../includes/common_res.html'/]
</head>
<body>
[#assign shadowNav=true/]
[#include '../includes/header.html'/]
<div class="container">
  <div class="row">
    <div class="col mt-1">
      <div class="d-flex align-items-center py-1 border-bottom">
        <div class="flex-grow-1 h5 mb-0"><a href="${base}/guestbook">留言板</a></div>
        <div><a class="btn btn-primary" href="${base}/guestbook/post" role="button">我要留言</a></div>
      </div>
      <div class="my-3">
        <h5>
          [#if guestbook.hasReplied]<span class="badge badge-success">已回复</span>[#else]<span class="badge badge-secondary">未回复</span>[/#if]
          <span class="badge badge-info">${guestbook.type.name}</span>
          ${guestbook.title}
        </h5>
        <div class="small text-black-50 mt-2 pb-2 border-bottom">
          <i class="far fa-user"></i> ${guestbook.username!guestbook.nickname!"匿名网友"}
          <i class="ml-2 far fa-clock"></i> ${ZFormat(guestbook.createTime, 'yyyy-MM-dd HH:mm:ss')}
        </div>
        <div class="mt-2">[#noescape]${guestbook.msgText!?html}[/#noescape]</div>
      </div>
      [#if guestbook.replyText??]
        <div class="border border-warning p-2 my-3">
          <h5 class="text-danger"><i class="fas fa-comment-dots"></i> 官方回复</h5>
          <div class="small text-muted"><i class="far fa-user"></i> ${guestbook.replyUserName} <i class="ml-2 far fa-clock"></i> ${ZFormat(guestbook.replyDate, 'yyyy-MM-dd HH:mm:ss')}</div>
          <div class="my-2">[#noescape]${guestbook.replyText!}[/#noescape]</div>
        </div>
      [/#if]
    </div>
  </div>
</div>
[#include '../includes/footer.html'/]
</body>
</html>
[/#escape]
